package com.bh.weapp.controller.customer;

import com.bh.common.core.controller.BaseController;
import com.bh.common.core.domain.AjaxResult;
import com.bh.shipment.domain.JcShipmentTrack;
import com.bh.shipment.service.IJcShipmentTrackService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 运单追踪Controller
 *
 * @author slx
 * @date 2023-04-22
 */
@Api(tags = {"CUST运单在途追踪"})
@RestController
@RequestMapping("/api/cust/shipment/shipmentTrack")
public class JcShipmentTrackCustApiController extends BaseController {

    @Autowired
    private IJcShipmentTrackService jcShipmentTrackService;

    /**
     * 查询运单追踪列表
     */
    @ApiOperation("查询运单追踪列表")
    @GetMapping("/getTrackByShipmentId/{jcShipmentId}")
    public AjaxResult getTrackByShipmentId(@PathVariable("jcShipmentId") Long jcShipmentId) {
        JcShipmentTrack jcShipmentTrac = new JcShipmentTrack();
        jcShipmentTrac.setJcShipmentId(jcShipmentId);
        List<JcShipmentTrack> list = jcShipmentTrackService.selectJcShipmentTrackList(jcShipmentTrac);
        return AjaxResult.success(list);
    }
}
